package BloomfilterSelf;

import Bloomfilter.BloomFilter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        BloomFilter bloomFilter = new BloomFilter(18, 1);
        List<String> list = Arrays.asList("石浩", "张三", "颛顼", "帝喾", "昌意", "喧嚣");
        for (String string : list) {
            bloomFilter.add(string);
        }

        List<String> aim = Arrays.asList("石浩1", "张三1", "颛顼1", "帝喾", "昌意", "喧嚣");
        for (String string : aim) {
            System.out.println("是否包含：" + string + "  " + bloomFilter.contains(string));
        }
    }
}
